package Testinterface;

import java.lang.reflect.Array;


/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-14
 * Time: 23:33
 */
class Student {
    String name;
    int age;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String toString() {
        return "["+this.name+":"+this.age+"]";
    }

}
public class Test4 {
    Student[] students = new Student[] {new Student("张三", 13),
            new Student("李四", 14), new Student("王五", 15)};

    Arrays.sort(students);
    System.out.println(Arrays.toString(students));




}
